Skip to content

Fix dependencies #46240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fix dependencies #46240

wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Jul 2, 2025

Both IntegrationDataSourceScriptDatabaseInitializer and QuartzDataSourceScriptDatabaseInitializer extend DataSourceScriptDatabaseInitializer from spring-boot-jdbc which should be required dependency.

Both `IntegrationDataSourceScriptDatabaseInitializer` and `QuartzDataSourceScriptDatabaseInitializer` extend `DataSourceScriptDatabaseInitializer` from `spring-boot-jdbc` which should be required dependency.

Signed-off-by: Yanming Zhou <[email protected]>
@wilkinsona
Copy link
Member

Thanks for spotting the potential problems here, @quaff, but the proposed changes are moving things in the wrong direction.

The auto-configuration of IntegrationDataSourceScriptDatabaseInitializer will already back off without spring-boot-jdbc:

Given this, the implementation dependency on spring-boot-sql in unnecessary. We're also missing a test. I've opened #46244.

The auto-configuration of QuartzDataSourceScriptDatabaseInitializer does not back off without spring-boot-jdbc and it should. I've opened #46243 for this.

@wilkinsona wilkinsona closed this Jul 2, 2025
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 2, 2025
@quaff
Copy link
Contributor Author

quaff commented Jul 2, 2025

@wilkinsona What about BatchDataSourceScriptDatabaseInitializer and JdbcSessionDataSourceScriptDatabaseInitializer, should spring-boot-jdbc be optional dependency also?

@wilkinsona
Copy link
Member

No, I don't think so. Boot's auto-configuration for Spring Batch requires JDBC as it always sets up the JDBC-based job store. As such, a required dependency on spring-boot-jdbc is OK there. Similarly, spring-boot-session-jdbc is a separate module that requires JDBC so a required dependency on spring-boot-jdbc is OK there too.

@quaff
Copy link
Contributor Author

quaff commented Jul 2, 2025

Spring Batch requires JDBC as it always sets up the JDBC-based job store.

Spring Batch supports to set up the MongoDB-based job store now, see spring-projects/spring-batch#877

@wilkinsona
Copy link
Member

We're aware of that but it doesn't affect the accuracy of what I said about Boot's auto-configuration for Batch. As and when we add auto-configuration for the MongoDB-based store, this situation will change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants